package com.sugon.modules.device.model.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.sugon.modules.device.consts.DevMaintenanceTicketType;
import lombok.Data;
import org.hibernate.validator.constraints.NotBlank;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

/**
 * @author ： YuXD
 * @description： 设备临时维护工单参数VO
 * @date ： 2020-09-03 下午 3:46
 * @version: 1.0
 */
@Data
public class DevTemMaintenanceTicketParamVO implements Serializable {

    /**
     * 设备ID
     */
    @NotBlank(message = "设备必选！")
    private String devId;

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @NotNull(message = "开始日期不能为空！")
    private Date startDate;

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @NotNull(message = "结束日期不能为空！")
    private Date endDate;

    @NotBlank(message = "问题描述必填！")
    private String desc;

    @NotBlank(message = "措施必填！")
    private String step;

    /**
     * 维修工单类型
     */
    private DevMaintenanceTicketType ticketType;


    /**
     * 车间ID
     */
    private String workshopId;

}
